class UserDict:
	# def __init__(self,dict=None):
	# 	self.data = {'0':'base'}
	# 	if dict is not None: self.data.update(dict)

	def __init__(self,dict=None,**kwargs):
		self.data = {}
		if dict is not None:
			self.update(dict)
		if len(kwargs):
			self.update(dict)


	def clear(self): self.data.clear()
	def keys(self):return self.data.keys()
	def copy(self):
		if self.__class__ is UserDict:
			return UserDict(self.data)
		import copy
		return copy.copy(self)
	def printdoc(self):
		print 'good'

# >>> from userdict import UserDict
# >>> dict = {'1':'kathy','0':'cgg'}
# >>> d = UserDict(dict)
# >>> d
# <userdict.UserDict instance at 0x021C15A8>
# >>> d.data
# {'1': 'kathy', '0': 'cgg'}
# >>>
# >>> dc = d.data.copy()
# >>> dc
# {'1': 'kathy', '0': 'cgg'}
# >>>
# >>> dc2 = d.copy()
# >>> dc2
# <userdict.UserDict instance at 0x021C1580>
# >>> dc2.data
# {'1': 'kathy', '0': 'cgg'}

